package com.itheima.aop;

import org.aspectj.lang.ProceedingJoinPoint;

public class AOPAdvice {
    public void before(){
        System.out.println("before");
    }
    public void after(){
        System.out.println("after");
    }
    public void afterReturning(){
        System.out.println("afterReturning");
    }
    public void afterThrowing(){
        System.out.println("afterThrowing");
    }
    public void around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("before");
        //调用原始方法
        pjp.proceed();
        System.out.println("around");
        System.out.println("after");
    }
}
